package cloud.study.eurekafeignclient.config;

import feign.Retryer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.concurrent.TimeUnit;

/**
 * feign配置类
 * @author <a href="mailto:luo_tian_fu@163.com">luotianfu</a>
 * @version 2018/9/26  luotianfu
 * @since 1.0
 */
@Configuration
public class FeignConfig {

    /**
     * 调用尝试
     * @return
     */
    @Bean
    public Retryer feignRetry() {
        return new Retryer.Default(100,TimeUnit.SECONDS.toMillis(1),5);
    }
}
